/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package photoshare.services;

import java.sql.SQLException;
import java.util.ArrayList;
import photoshare.dao.ThemeDAO;
import photoshare.dto.ThemeDTO;

/**
 *
 * @author PhotoShare
 */
public class ThemeService {

    public ThemeService() {
    }

    public boolean create(ThemeDTO themeDTO) throws SQLException {
        return new ThemeDAO().create(themeDTO);
    }

    public ArrayList<ThemeDTO> findAll() {
        return new ThemeDAO().readAll();
    }

    public ThemeDTO readById(Integer themeId) {
        return new ThemeDAO().readById(themeId);
    }

    public boolean updateById(ThemeDTO themeDTO, Integer themeId) throws SQLException {
        return new ThemeDAO().updateById(themeDTO, themeId);
    }

    public boolean deleteById(Integer themeId) throws SQLException {
        return new ThemeDAO().deleteById(themeId);
    }
}
